/*****************************************************
** Author: 
** Date: 2020-07-10
*
*****************************************************/

#ifndef __SLINK_H_
#define __SLINK_H_

#ifdef __cplusplus
extern "C"{
#endif

#define SUBDEV_LOG_TAG	"[SD]"

#define SUBDEV_DEBUG_LOG

#ifdef SUBDEV_DEBUG_LOG
#define subdev_log_dbg(_fmt_, ...) \
    	printf(SUBDEV_LOG_TAG"[%s:%d] "_fmt_"\r\n", __func__, __LINE__, ##__VA_ARGS__)
#define subdev_log_printf \
    	printf
#else
#define subdev_log_dbg(_fmt_, ...)
#define subdev_log_printf
#endif

#define subdev_log_inf(_fmt_, ...) \
    	printf(SUBDEV_LOG_TAG" "_fmt_"\r\n", ##__VA_ARGS__)
#define subdev_log_wrn(_fmt_, ...) \
    	printf(SUBDEV_LOG_TAG"[WRN] "_fmt_"\r\n", ##__VA_ARGS__)
#define subdev_log_err(_fmt_, ...) \
    	printf(SUBDEV_LOG_TAG"[ERR] "_fmt_"\r\n", ##__VA_ARGS__)

#ifndef SUBDEV_NUM_MAX
#define SUBDEV_NUM_MAX	4
#endif

struct subdev {
	struct subdev *next;
	int value;
};

void test(void);

#ifdef __cplusplus
}
#endif

#endif /* __SLINK_H_ */

